
#pragma once

#include <cstdint>
#include <vector>
#include <string>

#define CP_SERVICE_IP ecarx::transfer::ipcp::GetCPIP()
#define CP_SERVICE_NORMAL_PORT 50340
#define CP_SERVICE_TIME_PORT 50601
#define CP_SERVICE_AVAS_PORT 50602
#define CP_SERVICE_HOSTINFO_PORT 50603
#define CP_SERVICE_POWER_PORT 50604
#define AP_LOCAL_IP ecarx::transfer::ipcp::GetAPIP()
#define AP_LOCAL_PORT 50435
#define AP_VLAN_ID 0
#define AP_VLAN_PRIORITY 0
#define APCP_SERVER_IP "198.18.34.2"
#define APCP_IHU_IP "198.18.34.15"
#define APCP_MOCKTEST_IP "127.0.0.1"

namespace ecarx::transfer::ipcp{

    struct IpcpValue {
        uint16_t service_id;
        uint16_t oper_id;
        uint8_t oper_type;
        uint8_t payload_type;
        void* payload;
        std::size_t payload_len;
        char peer_ip[16];
        uint16_t peer_port;
    };
    bool IsDebugMode();
    const char* GetCPIP();
    const char* GetAPIP();
}
